import request from "@renderer/utils/request";

export function saveLayout(data) {
  return request({
    url: "/api/demos/saveLayout",
    method: "post",
    data,
  });
}

export function getLayoutById(id: string) {
  return request({
    url: "/api/demos/getLayoutbyId/" + id,
    method: "get",
  });
}

export function getLayoutList(query) {
  return request({
    url: "/api/demos/getLayoutList",
    method: "get",
    params: query,
  });
}

export function updateLayoutById(id: string, data) {
  return request({
    url: "/api/demos/updateById/" + id,
    method: "post",
    data,
  });
}
export function removeLayoutById(id: string) {
  return request({
    url: "/api/demos/removeById/" + id,
    method: "delete",
  });
}
